package log350.restaurant;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.support.v4.app.NavUtils;

public class Factures extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_factures);
		// Show the Up button in the action bar.
		getActionBar().setDisplayHomeAsUpEnabled(true);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_factures, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case android.R.id.home:
			NavUtils.navigateUpFromSameTask(this);
			return true;
		case R.id.Menu: {
			startActivity(new Intent(this, MainActivity.class));
			return (true);
		}
		case R.id.Commandes: {
			startActivity(new Intent(this, Commandes.class));
			return (true);
		}
		case R.id.Livraisons: {
			startActivity(new Intent(this, Livraisons.class));
			return (true);
		}
		case R.id.Factures: {
			startActivity(new Intent(this, Factures.class));
			return (true);
		}
		case R.id.Rapports: {
			startActivity(new Intent(this, Rapports.class));
			return (true);
		}
		}

		return super.onOptionsItemSelected(item);
	}

}
